package com.example.demo;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.RelationOneToMany;
import com.mybatisflex.annotation.Table;

import java.util.List;

@Table("person")
public class Person extends BaseEntity{

    String name;

    @RelationOneToMany(targetTable = "student", targetField = "personId")
    List<Student> students ;

//    @RelationOneToMany(targetTable = "child", targetField = "personId")
//    List<Child> children ;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }



    public List<Student> getStudents() {
        return students;
    }

    public void setStudents(List<Student> students) {
        this.students = students;
    }
}
